#!/usr/bin/env python
# coding: utf-8
from pprint import pprint
from utils import general_utils
from paper秭归DNN import run_many_times

if __name__ == '__main__':
    # 检查设置保存结果的各个文件夹是否存在，不存在则创建
    general_utils.check_data_settings_folder()

    # run_many_times_for_different_cls_weights(n=10, nb_max_epochs=500, max_weight=1)
    # print('----------------------开始权重比值1:1-------------------')
    performance_list = []
    for weight in range(0, 1):
        performance = run_many_times(n=1, nb_max_epochs=5,
                       cls_weight={0: 1, 1: weight+1},
                       save_test_pred_results=False,
                       save_all_pred_results=False,
                       save_fprTpr_to_npy=False,
                       save_trained_model=False,
                       node_num=480,
                       nb_mid_layers=0,
                       use_early_stop=False,
                       bat_size=1000,
                       flatten_neighbours=True
                       )
        performance_list.append(performance)
    pprint(performance_list, width=200, sort_dicts=False)

    # print('----------------------开始权重比值1:4-------------------')
    # run_many_times(n=10, nb_max_epochs=500,
    #                cls_weight={0: 1, 1: 4},
    #                save_test_pred_results=False,
    #                save_all_pred_results=False,
    #                save_fprTpr_to_npy=False,
    #                save_trained_model=False,
    #                node_num=480,
    #                nb_mid_layers=0,
    #                flatten_neighbours=True
    #                )
    # run_many_times_remove_some_factors(n=10, nb_max_epochs=500,
    #                                    cls_weight={0: 1, 1: 4})
